PhD

The LaTeX sources of my Ph.D. thesis
git clone https://esimon.eu/repos/PhD.git
Log | Files | Refs | README | LICENSE

dependency tree.tex (1701B)


      1 \begin{tikzpicture}[
      2 		word after/.style={right=0.9mm of #1, inner sep=0},
      3 		punctuation after/.style={right=0mm of #1, inner sep=0},
      4 		POS/.style={inner sep=0.4mm},
      5 		node to word/.style={dashed},
      6 		arc label/.style={pos=0.5,sloped,above},
      7 	]
      8 	\node[inner sep=0]               (john)     {\strut John};
      9 	\node[word after=john]           (found)    {\strut found};
     10 	\node[word after=found]          (a)        {\strut a};
     11 	\node[word after=a]              (solution) {\strut solution};
     12 	\node[word after=solution]       (to)       {\strut to};
     13 	\node[word after=to]             (the)      {\strut the};
     14 	\node[word after=the]            (problem)  {\strut problem};
     15 	\node[punctuation after=problem] (period)   {\strut .};
     16 
     17 	\coordinate (lvl0) at (0, 3);
     18 	\coordinate (lvl1) at (0, 2.25);
     19 	\coordinate (lvl2) at (0, 1.5);
     20 	\coordinate (lvl3) at (0, 0.75);
     21 
     22 	\node[POS] (njohn)     at (lvl1-|john)     {\texttt{N}};
     23 	\node[POS] (nfound)    at (lvl0-|found)    {\texttt{V}};
     24 	\node[POS] (na)        at (lvl2-|a)        {\texttt{Det}};
     25 	\node[POS] (nsolution) at (lvl1-|solution) {\texttt{N}};
     26 	\node[POS] (nthe)      at (lvl3-|the)      {\texttt{Det}};
     27 	\node[POS] (nproblem)  at (lvl2-|problem)  {\texttt{N}};
     28 
     29 	\foreach \word in {john, found, a, solution, the, problem}{
     30 		\draw[node to word] (\word) -- (n\word);
     31 	}
     32 
     33 	\draw[arrow] (nfound)    -- (njohn)     node[arc label] {\texttt{subj}};
     34 	\draw[arrow] (nfound)    -- (nsolution) node[arc label] {\texttt{obj}};
     35 	\draw[arrow] (nsolution) -- (na)        node[arc label] {\texttt{det}};
     36 	\draw[arrow] (nsolution) -- (nproblem)  node[arc label] {\texttt{to}};
     37 	\draw[arrow] (nproblem)  -- (nthe)      node[arc label] {\texttt{det}};
     38 \end{tikzpicture}